import React, { FC, useMemo } from 'react';
import { View, Text } from '@tarojs/components';
import { styled } from 'linaria/react';
import { MyCss, useClassName } from '@/utils/index';
import { Activities_Web, Activities_Res } from '@/pages/_server/_class/MyActivities/ActivitiesList';
import Body from './Body/Body';
import Footer from './Footer/Footer';
import { ActivitiesItemContext } from './ActivitiesItemContext';
type LocalCompProps = ICompProps & Activities_Web;
export interface IProps extends LocalCompProps {}
ActivitiesItem.defaultProps = {} as Partial<IProps>;
function ActivitiesItem(props: IProps) {
    const { className, style, onClick, ...other } = props;
    const localClassName = useClassName('ActivitiesItem', className);
    const localStyle = useMemo(() => {
        return {
            ...style,
            boxShadow: MyCss.cardBoxShadow,
        };
    }, [style]);
    return (
        <ActivitiesItemContext.Provider value={other}>
            <RootView className={localClassName} style={localStyle}>
                <Body></Body>
                <Footer></Footer>
                {/* <Body></Body>
                <Footer></Footer> */}
            </RootView>
        </ActivitiesItemContext.Provider>
    );
}
export default React.memo(ActivitiesItem as FC<IProps>);
const RootView = styled(View)`
    &.ActivitiesItem {
        position: relative;
        width: fit-content;
        border-radius: 16px;
        overflow: hidden;
        background-color: #fff;
        /* height: 320px; */
    }
`;
